//
//  TJUIAlertController.m
//  CrossBorderPayment
//
//  Created by hc-101 on 2020/6/9.
//  Copyright © 2020 xtjun. All rights reserved.
//

#import "TJUIAlertController.h"

@interface TJUIAlertController ()

@end

@implementation TJUIAlertController

- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(QMUIAlertControllerStyle)preferredStyle {
    if (self = [super initWithTitle:title message:message preferredStyle:preferredStyle]) {
        if (preferredStyle == QMUIAlertControllerStyleActionSheet) {
            self.sheetContentCornerRadius = 10;
            self.sheetCancelButtonMarginTop = 5;
            
            self.sheetDestructiveButtonAttributes = @{NSForegroundColorAttributeName:UIColorRed,NSFontAttributeName:UIFontMake(16), NSKernAttributeName:@(0)};
            self.sheetButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontMake(16),NSKernAttributeName:@(0)};
            self.sheetCancelButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontMake(16),NSKernAttributeName:@(0)};
        } else {
            self.alertContentCornerRadius = 10;
            self.alertDestructiveButtonAttributes = @{NSForegroundColorAttributeName:UIColorRed,NSFontAttributeName:UIFontMake(16), NSKernAttributeName:@(0)};
            self.alertButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontMake(16),NSKernAttributeName:@(0)};
            self.alertCancelButtonAttributes = @{NSForegroundColorAttributeName:UIColorBlack,NSFontAttributeName:UIFontMake(16),NSKernAttributeName:@(0)};
        }
        
    }
    return self;
}
@end
